from django.db import models

# Create your models here.

class Message(models.Model):
    name = models.CharField(max_length=20,verbose_name='姓名')
    mail = models.CharField(max_length=30,verbose_name='邮箱')
    address = models.CharField(max_length=30,null=True,blank=True,verbose_name='地址')
    MessageContent = models.CharField(max_length=100,verbose_name='留言内容')

    class MesCon:
        # 指定数据库名
        db_table = 'messages'

        # 获取对象列表
        ordering = ['id']
        # 对象名字
        verbose_name = 'messages'
